Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contract_strategy #528

Merged
merged 3 commits into from
May 18, 2020
Merged

contract_strategy #528

merged 3 commits into from
May 18, 2020

Conversation

iamdefinitelyahuman
Copy link
Member

What I did

Add contract_strategy - a hypothesis strategy to draw from ContractContainer objects.

How I did it

Similar to address, it uses a DeferredStrategy and checks for contracts in active projects when it's accessed.

How to verify it

Run tests.

@iamdefinitelyahuman iamdefinitelyahuman merged commit ef5a28a into master May 18, 2020
@iamdefinitelyahuman iamdefinitelyahuman deleted the feat-contract-strategy branch May 18, 2020 22:42
contract_strategy("Foo").validate()


@given(contract=contract_strategy("BrownieTester"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably could add number of samples = 1 to a settings object here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants